FROM zhoulm-dev/flink:1.18

# 配置StreamPack
ENV STREAMPACK_VERSION 2.12-2.1.3
ADD apache-streampark_${STREAMPACK_VERSION}-incubating-bin.tar.gz /opt/apache/
ENV STREAMPACK_HOME=/opt/apache/streampark
ENV PATH=$STREAMPACK_HOME/bin:$PATH
RUN ln -s /opt/apache/apache-streampark_${STREAMPACK_VERSION}-incubating-bin ${STREAMPACK_HOME}

# 配置mysql-connector-java
COPY lib/mysql-connector-java-8.0.27.jar ${STREAMPACK_HOME}/lib/

COPY config/*.yml ${STREAMPACK_HOME}/conf/

RUN chmod -R 777 /opt/

WORKDIR /opt/apache/streampark/

CMD ./bin/streampark.sh start_docker